package com.estar.assistsurvy.thread;

import com.estar.assistsurvy.constant.Constants;
import com.estar.assistsurvy.entity.RequestAbond;
import com.estar.assistsurvy.entity.ResponseMsg;

import android.content.Context;
import android.os.Handler;

public class AbondOrderThread extends BaseThread {

	private RequestAbond requestAbond;

	public AbondOrderThread(Context context, Handler handler, RequestAbond requestAbond) {
		super(context, handler);
		this.requestAbond = requestAbond;
	}
	
	@Override
	public void run() {
		// TODO Auto-generated method stub
		url_str=Constants.NAMESPACE+Constants.GRAB_ABANDON;
		json=gson.toJson(requestAbond);
		postRequest(url_str, json);
		if(result!=null){
			ResponseMsg abond=new ResponseMsg();
			abond=gson.fromJson(result, ResponseMsg.class);
			msg.what=0;
			msg.obj=abond;
			msg.sendToTarget();
		}
	}
}
